import React from 'react';
import {useNavigate } from 'react-router-dom';
import './index.css'
import TabBar from "../../components/TabBar/TabBar";

export default function Error() {
  const navigate = useNavigate();
    const initialTabIndex = 0; // 例如初始化为1
  const gotoHome = () =>{
    navigate('/home');
  }
  return (
      <div style={{ minHeight: '100vh', maxWidth: 414, margin: 'auto', backgroundColor: '#fff', display: 'flex', alignItems: 'center', justifyContent: 'center'}}>
        <div className="not-found-container">
            <div className="infinity-container">
                <div className="infinity"></div>
            </div>
            <span className="color-red">4</span>
            <span className="color-blue">0</span>
            <span className="color-red">4</span>
          <p>您所希望访问的页面不存在</p>
          <button className="home" onClick={gotoHome}>返回首页</button>
        </div>
          <TabBar initialTabIndex={initialTabIndex}/>
      </div>
  );
}
